Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Friday, March 30, 2012

How can I represent checkboxes in my report?

in my input form i have checkboxes and textboxes, if i click on a checkbox the textbox beside it enables, the textbox field is optional so the checkbox alone has a value that needs to be saved to the database. i have a report.rdlc, i want to display the checkboxes and the textboxes, what should i do?

I moved this thread to the SQL Server Reporting Services section, since it appears that you're asking how to put checkboxes and text boxes onto a SRS report (the rdlc file).

|||

icemart525 wrote:

in my input form i have checkboxes and textboxes, if i click on a checkbox the textbox beside it enables, the textbox field is optional so the checkbox alone has a value that needs to be saved to the database. i have a report.rdlc, i want to display the checkboxes and the textboxes, what should i do?

..or maybe I'll use an image, right?

sql

Monday, March 26, 2012

How can I print a field that is in the dataset on each page and show the table hearder on each p

How can I print a field that is in the dataset on each page? I added a textbox in the Page Header and use =Fields!ProjectName.value in the value property. I got an error "Fields cannot used in page header and footer."

How can I have the table header shows on each page? Currently if the data goes to the second page, there is no table header.

Thanks.

DanYeung

Hello Dan,

For the table header, right click on the row and go to properties. Change the RepeatOnNewPage property to True.

For the data field, you can add a textbox in your report header and reference the field by the textbox name that it is located in. Like this:

=First(ReportItems!TextBox9.Value)

Hope this helps.

Jarret

|||

Hi Jarret,

Thanks for your help. I took care the table header.

For the data field, I added a textbox in the body and the value is =Fields!vchrProjectName.Value . I made the textbox invisible. I also added a textbox in the page header and the value is =First(ReportItems!TextBox9.Value) as you suggested. It printed on the first page only. I think the textbox in the body has no value on the second page, so the textbox in the page header got noghting. What did I missed? Do I have put something in the RepeatWith property?

Thanks.

DanYeung

|||

I fixed the page header problem by adding one more table header row before the table header. Added a textbox on the row and used =Fields!ProjectName.value in the value property. Thanks for the idea.

DanYeung

|||

I have the same issue and I tried your suggestion by adding the text box in the body and reference that in the page header. Only the first page work, not others. Any other suggestions or I did something wrong?

Regards

Eric

|||

You have to add a table in the body. Select the table header row. Change the RepeatOnNewPage property to true. Change the table header background color to while. Add a textbox on the table header and add the field in the textbox. Adding the textbox in the body prints only once. You need the table.

DanYeung

|||

Forgive me, I don't understant the second last statement. "Adding the textbox in the body prints only once". Can you explain a little bit more? Also, why to change background color to white?

Best Regards,

Eric

|||

Adding a textbox directly in the body won't print on the second page. If you want to repeat on every page, you have to add a table. The default background color for table header is grey. You don't have to change to white if you prefer grey.

DanYeung

|||

Hey I couldn't find an easy fix so what I would up doing was creating a report parameter set it as internal so it did not prompt when the report was being created and then for available and default values i selected it as a "from query" and pulled the value from there (with a linked dataset). Works like a charm for me in preview and exporting to PDFs. Here is the XML view of the report I created pulling fields, EmpName, MgrName and EmpPosition as EmpName, MgrName, and Position. The name of my dataset is dsGoals.

Code Snippet

<ReportParameter Name="EmpName">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpName</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<ValidValues>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpName</ValueField>

</DataSetReference>

</ValidValues>

</ReportParameter>

<ReportParameter Name="MgrName">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>MgrName</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<ValidValues>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>MgrName</ValueField>

</DataSetReference>

</ValidValues>

</ReportParameter>

<ReportParameter Name="Position">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpPosition</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<ValidValues>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpPosition</ValueField>

</DataSetReference>

</ValidValues>

</ReportParameter>

How can I print a field that is in the dataset on each page and show the table hearder on each p

How can I print a field that is in the dataset on each page? I added a textbox in the Page Header and use =Fields!ProjectName.value in the value property. I got an error "Fields cannot used in page header and footer."

How can I have the table header shows on each page? Currently if the data goes to the second page, there is no table header.

Thanks.

DanYeung

Hello Dan,

For the table header, right click on the row and go to properties. Change the RepeatOnNewPage property to True.

For the data field, you can add a textbox in your report header and reference the field by the textbox name that it is located in. Like this:

=First(ReportItems!TextBox9.Value)

Hope this helps.

Jarret

|||

Hi Jarret,

Thanks for your help. I took care the table header.

For the data field, I added a textbox in the body and the value is =Fields!vchrProjectName.Value . I made the textbox invisible. I also added a textbox in the page header and the value is =First(ReportItems!TextBox9.Value) as you suggested. It printed on the first page only. I think the textbox in the body has no value on the second page, so the textbox in the page header got noghting. What did I missed? Do I have put something in the RepeatWith property?

Thanks.

DanYeung

|||

I fixed the page header problem by adding one more table header row before the table header. Added a textbox on the row and used =Fields!ProjectName.value in the value property. Thanks for the idea.

DanYeung

|||

I have the same issue and I tried your suggestion by adding the text box in the body and reference that in the page header. Only the first page work, not others. Any other suggestions or I did something wrong?

Regards

Eric

|||

You have to add a table in the body. Select the table header row. Change the RepeatOnNewPage property to true. Change the table header background color to while. Add a textbox on the table header and add the field in the textbox. Adding the textbox in the body prints only once. You need the table.

DanYeung

|||

Forgive me, I don't understant the second last statement. "Adding the textbox in the body prints only once". Can you explain a little bit more? Also, why to change background color to white?

Best Regards,

Eric

|||

Adding a textbox directly in the body won't print on the second page. If you want to repeat on every page, you have to add a table. The default background color for table header is grey. You don't have to change to white if you prefer grey.

DanYeung

|||

Hey I couldn't find an easy fix so what I would up doing was creating a report parameter set it as internal so it did not prompt when the report was being created and then for available and default values i selected it as a "from query" and pulled the value from there (with a linked dataset). Works like a charm for me in preview and exporting to PDFs. Here is the XML view of the report I created pulling fields, EmpName, MgrName and EmpPosition as EmpName, MgrName, and Position. The name of my dataset is dsGoals.

Code Snippet

<ReportParameter Name="EmpName">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpName</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<ValidValues>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpName</ValueField>

</DataSetReference>

</ValidValues>

</ReportParameter>

<ReportParameter Name="MgrName">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>MgrName</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<ValidValues>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>MgrName</ValueField>

</DataSetReference>

</ValidValues>

</ReportParameter>

<ReportParameter Name="Position">

<DataType>String</DataType>

<DefaultValue>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpPosition</ValueField>

</DataSetReference>

</DefaultValue>

<AllowBlank>true</AllowBlank>

<ValidValues>

<DataSetReference>

<DataSetName>dsGoals</DataSetName>

<ValueField>EmpPosition</ValueField>

</DataSetReference>

</ValidValues>

</ReportParameter>

Friday, March 9, 2012

How can I include two expressions in one textbox?

Here are the expresstions:
=(Fields!Purchase.Value + Fields!Matrix.Value + Fields!QualiFly.Value +
Fields!Dist.Value + Fields!SM.Value + Fields!BreakAway.Value +
Fields!Transfer.Value + Fields!Spent.Value)
=iif(fields!Purchase.Value=0, "black", "red")
Thanks,
TrintIt appears that your expressions are doing two different things. I will
infer from this that you want the first expression to yield the value, and
the second to yield the font color.
Therefore, you would set the "Value" property to the first expression. Then
under the font settings, set the font color equal to the second expression.
Brian
"trint" <trinity.smith@.gmail.com> wrote in message
news:1122298713.103364.68910@.g14g2000cwa.googlegroups.com...
> Here are the expresstions:
> =(Fields!Purchase.Value + Fields!Matrix.Value + Fields!QualiFly.Value +
> Fields!Dist.Value + Fields!SM.Value + Fields!BreakAway.Value +
> Fields!Transfer.Value + Fields!Spent.Value)
> =iif(fields!Purchase.Value=0, "black", "red")
> Thanks,
> Trint
>|||But, how do I add a second expression?
=(Fields!Purchase.Value + Fields!Matrix.Value + Fields!QualiFly.Value +
Fields!Dist.Value + Fields!SM.Value + Fields!BreakAway.Value +
Fields!Transfer.Value + Fields!Spent.Value) +
=iif(fields!Purchase.Value=0, "black", "red") ?
I know that doesn't work, but that is what I mean.
Thanks,
Trint|||Write this in Purchase Textbox -> Rightclick -> Expression
=(Fields!Purchase.Value + Fields!Matrix.Value + Fields!QualiFly.Value +
Fields!Dist.Value + Fields!SM.Value + Fields!BreakAway.Value +
Fields!Transfer.Value + Fields!Spent.Value)
go to Purchase Properties, click on FontColor -> Choose Expression and write
the foll.
=iif(fields!Purchase.Value=0, "black", "red")
Hope it helps.
Girija
"trint" wrote:
> But, how do I add a second expression?
> =(Fields!Purchase.Value + Fields!Matrix.Value + Fields!QualiFly.Value +
> Fields!Dist.Value + Fields!SM.Value + Fields!BreakAway.Value +
> Fields!Transfer.Value + Fields!Spent.Value) +
> =iif(fields!Purchase.Value=0, "black", "red") ?
> I know that doesn't work, but that is what I mean.
> Thanks,
> Trint
>

Wednesday, March 7, 2012

How can I hide a textbox using iif field condition...help?

Ok,
I have a set of textboxs on the left (in header) and on the right.
If the data comes accross as this, its ok to show it (notice that
addresses are different):
SOLD TO: SHIPPED TO:
John Doe John Doe
123 This Place 321 That Place
Anywhere, TN 37777 Anywhere, TN 37777
But, if the data comes across as this, its NOT ok to show the SHIPPED
TO (notice that addresses are Same):
SOLD TO: SHIPPED TO:
John Doe John Doe
123 This Place 123 This Place
Anywhere, TN 37777 Anywhere, TN 37777
It is supposed to look like this:
SOLD TO: SHIPPED TO:
John Doe SAME
123 This Place
Anywhere, TN 37777
How can I write an expression to display this way on the visibility
condition?
Is it something like this?:
In the SHIPPED TO name textbox (let's say TextBox1) and SHIPPED TO
address TextBox9 is what constitutes the condition, under visibility
tab:
=IIF(Fields!TextBox2.Value.ToString() = TextBox9.Value,False, True)
////TextBox2 is where the Sold To Address is.
Any help is apprectiated.
Thanks,
Trintthat's the basic idea but what you really are comparing are the
fields!SOLD_TO_ADDRESS.Value = fields!SHIP_TO_ADDRESS.Value not the text box
values themselves, you have to compare the values of the fields in your
dataset. so keep your same construct, just make sure of what you're
comparing.
"trint" wrote:
> Ok,
> I have a set of textboxs on the left (in header) and on the right.
> If the data comes accross as this, its ok to show it (notice that
> addresses are different):
> SOLD TO: SHIPPED TO:
> John Doe John Doe
> 123 This Place 321 That Place
> Anywhere, TN 37777 Anywhere, TN 37777
> But, if the data comes across as this, its NOT ok to show the SHIPPED
> TO (notice that addresses are Same):
> SOLD TO: SHIPPED TO:
> John Doe John Doe
> 123 This Place 123 This Place
> Anywhere, TN 37777 Anywhere, TN 37777
> It is supposed to look like this:
> SOLD TO: SHIPPED TO:
> John Doe SAME
> 123 This Place
> Anywhere, TN 37777
> How can I write an expression to display this way on the visibility
> condition?
> Is it something like this?:
> In the SHIPPED TO name textbox (let's say TextBox1) and SHIPPED TO
> address TextBox9 is what constitutes the condition, under visibility
> tab:
> =IIF(Fields!TextBox2.Value.ToString() = TextBox9.Value,False, True)
> ////TextBox2 is where the Sold To Address is.
> Any help is apprectiated.
> Thanks,
> Trint
>|||Yeah! Now, how do I use this in an iif expression.
Thanks,
Trint|||you'll need to have coditional visibility AND conditional value for your
ship_to text box. I'm assuming you have separate text boxes for each line (
ship_to_name, ship_to_address, ship_to_city_state_zip , same for sold_to text
boxes)
*** VISIBILITY SHIP TO TEXT BOX**
=IIF(Fields!SOLD_TO_ADDRESS.Value = Fields!SHIP_TO_ADDRESS.Value,False, True)
do the same for each text box that may need to be hidden.
you need to conditional format for the ship_to_name to display "SAME" and
not the actual person's name. Use the same type logic.
*** SHIPPED_TO_NAME text box value property
=IIF(Fields!SOLD_TO_ADDRESS.Value = Fields!SHIP_TO_ADDRESS.Value,"SAME",
Fields!SHIPPED_TO_NAME.Value)
"trint" wrote:
> Yeah! Now, how do I use this in an iif expression.
> Thanks,
> Trint
>|||Thank you Mike, I am testing my app...
Trint|||That was it Mike!
Thanks,
Trint

Monday, February 27, 2012

How can I get the Texbox Action's to diplay a report in a new browser.

Hello,
I would like to click on a report's textbox and it opens up another
report in a new browser? I have the URL and it parameter. I placed them in
the textbox's ACTION attribute but the new report displays in the same
browser.
Any suggestions?
Thanks,
SteveHere is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"steve kwon" <steven,kwon@.lmco.com> wrote in message
news:OsOz9ltkFHA.3580@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I would like to click on a report's textbox and it opens up another
> report in a new browser? I have the URL and it parameter. I placed them
> in the textbox's ACTION attribute but the new report displays in the same
> browser.
> Any suggestions?
> Thanks,
> Steve
>|||Thanks, I went that route too. But I will try it again since you were
successful.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:e3rnQrtkFHA.3656@.TK2MSFTNGP09.phx.gbl...
> Here is an example of a Jump to URL link I use. This causes Excel to come
> up with the data in a separate window:
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "steve kwon" <steven,kwon@.lmco.com> wrote in message
> news:OsOz9ltkFHA.3580@.TK2MSFTNGP09.phx.gbl...
>> Hello,
>> I would like to click on a report's textbox and it opens up another
>> report in a new browser? I have the URL and it parameter. I placed them
>> in the textbox's ACTION attribute but the new report displays in the same
>> browser.
>> Any suggestions?
>> Thanks,
>> Steve
>|||You have to have either SP1 or SP2 installed (it was introduced with SP1).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"steve kwon" <steven,kwon@.lmco.com> wrote in message
news:%23jh%23BSukFHA.1444@.TK2MSFTNGP10.phx.gbl...
> Thanks, I went that route too. But I will try it again since you were
> successful.
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:e3rnQrtkFHA.3656@.TK2MSFTNGP09.phx.gbl...
>> Here is an example of a Jump to URL link I use. This causes Excel to come
>> up with the data in a separate window:
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
>> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "steve kwon" <steven,kwon@.lmco.com> wrote in message
>> news:OsOz9ltkFHA.3580@.TK2MSFTNGP09.phx.gbl...
>> Hello,
>> I would like to click on a report's textbox and it opens up another
>> report in a new browser? I have the URL and it parameter. I placed
>> them in the textbox's ACTION attribute but the new report displays in
>> the same browser.
>> Any suggestions?
>> Thanks,
>> Steve
>>
>|||Thanks Bruce. It worked.
<Action>
<Hyperlink>="javascript:void(window.open('http://www.google.com',
'_blank'))"</Hyperlink>
</Action>
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23te2YkukFHA.3144@.TK2MSFTNGP12.phx.gbl...
> You have to have either SP1 or SP2 installed (it was introduced with SP1).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "steve kwon" <steven,kwon@.lmco.com> wrote in message
> news:%23jh%23BSukFHA.1444@.TK2MSFTNGP10.phx.gbl...
>> Thanks, I went that route too. But I will try it again since you were
>> successful.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:e3rnQrtkFHA.3656@.TK2MSFTNGP09.phx.gbl...
>> Here is an example of a Jump to URL link I use. This causes Excel to
>> come up with the data in a separate window:
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
>> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "steve kwon" <steven,kwon@.lmco.com> wrote in message
>> news:OsOz9ltkFHA.3580@.TK2MSFTNGP09.phx.gbl...
>> Hello,
>> I would like to click on a report's textbox and it opens up another
>> report in a new browser? I have the URL and it parameter. I placed
>> them in the textbox's ACTION attribute but the new report displays in
>> the same browser.
>> Any suggestions?
>> Thanks,
>> Steve
>>
>>
>|||I have been trying this and it is not working for me. I actually have it
embedded in an Iif statement, but even plain navigation JUMP TO URL
expression it is not working. Do I need to add a reference to something else
to get the javascript working?
Here's my code from the expression:
=Iif (Fields!STATUS.Value <>
"6","javascript:void(window.open('"http://<servername/<subdir>/<filename>?FN"
& code.displaylink(Fields!SigFullPath.Value) &
"&PD=','_blank'))","mailto:scconops@.mydomain.com?Subject=Restore%20Request%20For%20Archived%20Document&Body=Please%20restore%20the%20following%20document.%0A%0ACustomer%20Name:%20"&
Fields!DOCNAME.Value & "%0A%0AAcct#:%20"& Fields!ACCOUNTNO.value &
"%0A%0AObligor#:%20" & Fields!OBLIGORNO.value & "%0A%0ASystem:%20"&
Fields!LIBRARY.Value & "%0A%0ASSN:%20"& fields!SSNO1.Value &"&CC="&
(Right(User!UserID,5)) & "@.mydomain.com")
"steve kwon" wrote:
> Thanks Bruce. It worked.
> <Action>
> <Hyperlink>="javascript:void(window.open('http://www.google.com',
> '_blank'))"</Hyperlink>
> </Action>
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23te2YkukFHA.3144@.TK2MSFTNGP12.phx.gbl...
> > You have to have either SP1 or SP2 installed (it was introduced with SP1).
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "steve kwon" <steven,kwon@.lmco.com> wrote in message
> > news:%23jh%23BSukFHA.1444@.TK2MSFTNGP10.phx.gbl...
> >> Thanks, I went that route too. But I will try it again since you were
> >> successful.
> >>
> >>
> >> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> >> news:e3rnQrtkFHA.3656@.TK2MSFTNGP09.phx.gbl...
> >> Here is an example of a Jump to URL link I use. This causes Excel to
> >> come up with the data in a separate window:
> >>
> >> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> >> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> >> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "steve kwon" <steven,kwon@.lmco.com> wrote in message
> >> news:OsOz9ltkFHA.3580@.TK2MSFTNGP09.phx.gbl...
> >> Hello,
> >>
> >> I would like to click on a report's textbox and it opens up another
> >> report in a new browser? I have the URL and it parameter. I placed
> >> them in the textbox's ACTION attribute but the new report displays in
> >> the same browser.
> >>
> >> Any suggestions?
> >>
> >> Thanks,
> >> Steve
> >>
> >>
> >>
> >>
> >>
> >
> >
>
>