Tuesday, March 20, 2012

Repeating Textbox

I'm creating a form which will enter all the information from the database
onto the form when the user enters a paramter. The problem is that I can't
get it to display more than one form.
Let say that the user wants all information from a certain company on the
form such as employees. The user enters the company name as parameter, and
then click view. There are about 25 employees, and that should generate 25
forms.
So can anyone point me to how to go about setting the form so that it will
generate all 25 forms with each employee's information on that form?Read up on subforms.
Do the following.
1.Create a report that just shows data for a single employee. Use a query
parameter that accepts employee id. Test and make sure it works
2. Create a report that just lists the employee ids based on the company
query parameter
3. Embed the first report as a subreport, right click on the embedded
subreport and map the employee id parameter to employee id in the company
report.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"chang" <chang@.discussions.microsoft.com> wrote in message
news:9CAFDA8D-84F0-45FA-AADF-E3403992D1F8@.microsoft.com...
> I'm creating a form which will enter all the information from the database
> onto the form when the user enters a paramter. The problem is that I
can't
> get it to display more than one form.
> Let say that the user wants all information from a certain company on the
> form such as employees. The user enters the company name as parameter,
and
> then click view. There are about 25 employees, and that should generate
25
> forms.
> So can anyone point me to how to go about setting the form so that it will
> generate all 25 forms with each employee's information on that form?
>|||Thank you Bruce. This works and saves me a lot of time trying to figure it
out.
If I wanted to say do the same thing, but now not using parameter. Do I
just set it like what you went over without the paramter part? The reason is
I also need to create report that will allow the user to do a mass print of
all employees information within all the companies.
"Bruce L-C [MVP]" wrote:
> Read up on subforms.
> Do the following.
> 1.Create a report that just shows data for a single employee. Use a query
> parameter that accepts employee id. Test and make sure it works
> 2. Create a report that just lists the employee ids based on the company
> query parameter
> 3. Embed the first report as a subreport, right click on the embedded
> subreport and map the employee id parameter to employee id in the company
> report.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "chang" <chang@.discussions.microsoft.com> wrote in message
> news:9CAFDA8D-84F0-45FA-AADF-E3403992D1F8@.microsoft.com...
> > I'm creating a form which will enter all the information from the database
> > onto the form when the user enters a paramter. The problem is that I
> can't
> > get it to display more than one form.
> >
> > Let say that the user wants all information from a certain company on the
> > form such as employees. The user enters the company name as parameter,
> and
> > then click view. There are about 25 employees, and that should generate
> 25
> > forms.
> >
> > So can anyone point me to how to go about setting the form so that it will
> > generate all 25 forms with each employee's information on that form?
> >
>
>|||Instead of using = use like and have the parameter value be %. Try it with
the employee report.
Bruce Loehle-Conger
"chang" <chang@.discussions.microsoft.com> wrote in message
news:57B79B63-0809-4FCB-AA90-9483EDEA7461@.microsoft.com...
> Thank you Bruce. This works and saves me a lot of time trying to figure
> it
> out.
> If I wanted to say do the same thing, but now not using parameter. Do I
> just set it like what you went over without the paramter part? The reason
> is
> I also need to create report that will allow the user to do a mass print
> of
> all employees information within all the companies.
>
> "Bruce L-C [MVP]" wrote:
>> Read up on subforms.
>> Do the following.
>> 1.Create a report that just shows data for a single employee. Use a query
>> parameter that accepts employee id. Test and make sure it works
>> 2. Create a report that just lists the employee ids based on the company
>> query parameter
>> 3. Embed the first report as a subreport, right click on the embedded
>> subreport and map the employee id parameter to employee id in the company
>> report.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "chang" <chang@.discussions.microsoft.com> wrote in message
>> news:9CAFDA8D-84F0-45FA-AADF-E3403992D1F8@.microsoft.com...
>> > I'm creating a form which will enter all the information from the
>> > database
>> > onto the form when the user enters a paramter. The problem is that I
>> can't
>> > get it to display more than one form.
>> >
>> > Let say that the user wants all information from a certain company on
>> > the
>> > form such as employees. The user enters the company name as parameter,
>> and
>> > then click view. There are about 25 employees, and that should
>> > generate
>> 25
>> > forms.
>> >
>> > So can anyone point me to how to go about setting the form so that it
>> > will
>> > generate all 25 forms with each employee's information on that form?
>> >
>>|||Bruce,
I did as what you mentioned about creating the first report with just one
information and then create that query to have a parameter.
I then create the second report with just the parameter(employee id).
I then embedded the first report into the second report and went to the
properties of the embedded report(the first one) and set the parameter.
This is the error that i get:
"An error occurred while executing the subreport 'subreport1': The
expressoin referenced a non-existing field in the fields collection."
I got nothing in the subreport field...not sure what I did wrong. Please
advise.
Thanks.
"Bruce L-C [MVP]" wrote:
> Instead of using = use like and have the parameter value be %. Try it with
> the employee report.
> Bruce Loehle-Conger
>
> "chang" <chang@.discussions.microsoft.com> wrote in message
> news:57B79B63-0809-4FCB-AA90-9483EDEA7461@.microsoft.com...
> > Thank you Bruce. This works and saves me a lot of time trying to figure
> > it
> > out.
> >
> > If I wanted to say do the same thing, but now not using parameter. Do I
> > just set it like what you went over without the paramter part? The reason
> > is
> > I also need to create report that will allow the user to do a mass print
> > of
> > all employees information within all the companies.
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Read up on subforms.
> >> Do the following.
> >> 1.Create a report that just shows data for a single employee. Use a query
> >> parameter that accepts employee id. Test and make sure it works
> >> 2. Create a report that just lists the employee ids based on the company
> >> query parameter
> >> 3. Embed the first report as a subreport, right click on the embedded
> >> subreport and map the employee id parameter to employee id in the company
> >> report.
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "chang" <chang@.discussions.microsoft.com> wrote in message
> >> news:9CAFDA8D-84F0-45FA-AADF-E3403992D1F8@.microsoft.com...
> >> > I'm creating a form which will enter all the information from the
> >> > database
> >> > onto the form when the user enters a paramter. The problem is that I
> >> can't
> >> > get it to display more than one form.
> >> >
> >> > Let say that the user wants all information from a certain company on
> >> > the
> >> > form such as employees. The user enters the company name as parameter,
> >> and
> >> > then click view. There are about 25 employees, and that should
> >> > generate
> >> 25
> >> > forms.
> >> >
> >> > So can anyone point me to how to go about setting the form so that it
> >> > will
> >> > generate all 25 forms with each employee's information on that form?
> >> >
> >>
> >>
> >>
>
>|||Bruce,
I did what you have, and I shouldn't say it didn't work. It does work, but
I can only get one contact per a parameter.
If possible, I want to get the parameter to dynamically display all company
and the user can select that company to have it display all the employees.
Thanks.
"chang" wrote:
> Bruce,
> I did as what you mentioned about creating the first report with just one
> information and then create that query to have a parameter.
> I then create the second report with just the parameter(employee id).
> I then embedded the first report into the second report and went to the
> properties of the embedded report(the first one) and set the parameter.
> This is the error that i get:
> "An error occurred while executing the subreport 'subreport1': The
> expressoin referenced a non-existing field in the fields collection."
> I got nothing in the subreport field...not sure what I did wrong. Please
> advise.
> Thanks.
> "Bruce L-C [MVP]" wrote:
> > Instead of using = use like and have the parameter value be %. Try it with
> > the employee report.
> >
> > Bruce Loehle-Conger
> >
> >
> > "chang" <chang@.discussions.microsoft.com> wrote in message
> > news:57B79B63-0809-4FCB-AA90-9483EDEA7461@.microsoft.com...
> > > Thank you Bruce. This works and saves me a lot of time trying to figure
> > > it
> > > out.
> > >
> > > If I wanted to say do the same thing, but now not using parameter. Do I
> > > just set it like what you went over without the paramter part? The reason
> > > is
> > > I also need to create report that will allow the user to do a mass print
> > > of
> > > all employees information within all the companies.
> > >
> > >
> > > "Bruce L-C [MVP]" wrote:
> > >
> > >> Read up on subforms.
> > >> Do the following.
> > >> 1.Create a report that just shows data for a single employee. Use a query
> > >> parameter that accepts employee id. Test and make sure it works
> > >> 2. Create a report that just lists the employee ids based on the company
> > >> query parameter
> > >> 3. Embed the first report as a subreport, right click on the embedded
> > >> subreport and map the employee id parameter to employee id in the company
> > >> report.
> > >>
> > >> --
> > >> Bruce Loehle-Conger
> > >> MVP SQL Server Reporting Services
> > >>
> > >> "chang" <chang@.discussions.microsoft.com> wrote in message
> > >> news:9CAFDA8D-84F0-45FA-AADF-E3403992D1F8@.microsoft.com...
> > >> > I'm creating a form which will enter all the information from the
> > >> > database
> > >> > onto the form when the user enters a paramter. The problem is that I
> > >> can't
> > >> > get it to display more than one form.
> > >> >
> > >> > Let say that the user wants all information from a certain company on
> > >> > the
> > >> > form such as employees. The user enters the company name as parameter,
> > >> and
> > >> > then click view. There are about 25 employees, and that should
> > >> > generate
> > >> 25
> > >> > forms.
> > >> >
> > >> > So can anyone point me to how to go about setting the form so that it
> > >> > will
> > >> > generate all 25 forms with each employee's information on that form?
> > >> >
> > >>
> > >>
> > >>
> >
> >
> >

No comments:

Post a Comment