Wednesday, March 28, 2012
Link to a report with parameters
This report must be called by URL link on an Html page.
This link must contains the values of these parameters; I don' want
specify the values when I see the report by clicking on View report button.
Is it possible? How?
What is the format of link for passing parameters to filter data?
Many thanks1. Try leaving the parameter Prompt blank... This should prevent the
parameter from displaying, (but you must provide a default value...)
2. Search for URL Access in Books on line and you will get an entire list
of all of the things you can do via URL in reporting services.
Hope this helps..
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
"Pasquale" wrote:
> I need to create a report with some parameters for filtering data.
> This report must be called by URL link on an Html page.
> This link must contains the values of these parameters; I don' want
> specify the values when I see the report by clicking on View report button.
> Is it possible? How?
> What is the format of link for passing parameters to filter data?
> Many thanks|||I tried passing parameters in URL address successfully,
but I see some parameters that the user hasn't change!
Moreover, if I change the parameter property "User request"
by setting to false value, the call of report dumps!
The issue is partially solved! I need to pass a parameter by Url
and these parameters cannot change by a user.
Can I solve this problem URGENTLY?
Many thanks
"Wayne Snyder" wrote:
> 1. Try leaving the parameter Prompt blank... This should prevent the
> parameter from displaying, (but you must provide a default value...)
> 2. Search for URL Access in Books on line and you will get an entire list
> of all of the things you can do via URL in reporting services.
> Hope this helps..
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> I support the Professional Association for SQL Server ( PASS) and it''s
> community of SQL Professionals.
>
> "Pasquale" wrote:
> > I need to create a report with some parameters for filtering data.
> > This report must be called by URL link on an Html page.
> > This link must contains the values of these parameters; I don' want
> > specify the values when I see the report by clicking on View report button.
> > Is it possible? How?
> > What is the format of link for passing parameters to filter data?
> >
> > Many thanks|||Read the rest of Wayne's post. He is telling you how to hide a parameter so
the user doesn't see it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:471AB25B-E6A6-4E1A-9756-CA42FB10DB66@.microsoft.com...
>I tried passing parameters in URL address successfully,
> but I see some parameters that the user hasn't change!
> Moreover, if I change the parameter property "User request"
> by setting to false value, the call of report dumps!
> The issue is partially solved! I need to pass a parameter by Url
> and these parameters cannot change by a user.
> Can I solve this problem URGENTLY?
> Many thanks
>
> "Wayne Snyder" wrote:
>> 1. Try leaving the parameter Prompt blank... This should prevent the
>> parameter from displaying, (but you must provide a default value...)
>> 2. Search for URL Access in Books on line and you will get an entire
>> list
>> of all of the things you can do via URL in reporting services.
>> Hope this helps..
>> --
>> Wayne Snyder MCDBA, SQL Server MVP
>> Mariner, Charlotte, NC
>> I support the Professional Association for SQL Server ( PASS) and it''s
>> community of SQL Professionals.
>>
>> "Pasquale" wrote:
>> > I need to create a report with some parameters for filtering data.
>> > This report must be called by URL link on an Html page.
>> > This link must contains the values of these parameters; I don' want
>> > specify the values when I see the report by clicking on View report
>> > button.
>> > Is it possible? How?
>> > What is the format of link for passing parameters to filter data?
>> >
>> > Many thanks|||I have executed several tries modifying the parameter settings.
I have followed your suggests, but the solution isn't complete:
or I see the parameter or I cannot modify the parameter
that I pass via URL (an error occurs!!!)!
Many thanks
"Bruce L-C [MVP]" wrote:
> Read the rest of Wayne's post. He is telling you how to hide a parameter so
> the user doesn't see it.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:471AB25B-E6A6-4E1A-9756-CA42FB10DB66@.microsoft.com...
> >I tried passing parameters in URL address successfully,
> > but I see some parameters that the user hasn't change!
> > Moreover, if I change the parameter property "User request"
> > by setting to false value, the call of report dumps!
> >
> > The issue is partially solved! I need to pass a parameter by Url
> > and these parameters cannot change by a user.
> >
> > Can I solve this problem URGENTLY?
> >
> > Many thanks
> >
> >
> > "Wayne Snyder" wrote:
> >
> >> 1. Try leaving the parameter Prompt blank... This should prevent the
> >> parameter from displaying, (but you must provide a default value...)
> >>
> >> 2. Search for URL Access in Books on line and you will get an entire
> >> list
> >> of all of the things you can do via URL in reporting services.
> >>
> >> Hope this helps..
> >> --
> >> Wayne Snyder MCDBA, SQL Server MVP
> >> Mariner, Charlotte, NC
> >>
> >> I support the Professional Association for SQL Server ( PASS) and it''s
> >> community of SQL Professionals.
> >>
> >>
> >> "Pasquale" wrote:
> >>
> >> > I need to create a report with some parameters for filtering data.
> >> > This report must be called by URL link on an Html page.
> >> > This link must contains the values of these parameters; I don' want
> >> > specify the values when I see the report by clicking on View report
> >> > button.
> >> > Is it possible? How?
> >> > What is the format of link for passing parameters to filter data?
> >> >
> >> > Many thanks
>
>|||Two different things. First is getting the parameters to work. Then making
them hidden. Do you have them working properly so you know your URL is
correct. Be sure that your parameter is with the correct case since RS is
case sensitive with parameters. Once you know your URL is correct because
your report works properly then you can deal with hidding the parameters.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:E50B32E5-DCC3-448C-A679-75233BBA3F8D@.microsoft.com...
>I have executed several tries modifying the parameter settings.
> I have followed your suggests, but the solution isn't complete:
> or I see the parameter or I cannot modify the parameter
> that I pass via URL (an error occurs!!!)!
> Many thanks
>
> "Bruce L-C [MVP]" wrote:
>> Read the rest of Wayne's post. He is telling you how to hide a parameter
>> so
>> the user doesn't see it.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
>> news:471AB25B-E6A6-4E1A-9756-CA42FB10DB66@.microsoft.com...
>> >I tried passing parameters in URL address successfully,
>> > but I see some parameters that the user hasn't change!
>> > Moreover, if I change the parameter property "User request"
>> > by setting to false value, the call of report dumps!
>> >
>> > The issue is partially solved! I need to pass a parameter by Url
>> > and these parameters cannot change by a user.
>> >
>> > Can I solve this problem URGENTLY?
>> >
>> > Many thanks
>> >
>> >
>> > "Wayne Snyder" wrote:
>> >
>> >> 1. Try leaving the parameter Prompt blank... This should prevent the
>> >> parameter from displaying, (but you must provide a default value...)
>> >>
>> >> 2. Search for URL Access in Books on line and you will get an entire
>> >> list
>> >> of all of the things you can do via URL in reporting services.
>> >>
>> >> Hope this helps..
>> >> --
>> >> Wayne Snyder MCDBA, SQL Server MVP
>> >> Mariner, Charlotte, NC
>> >>
>> >> I support the Professional Association for SQL Server ( PASS) and
>> >> it''s
>> >> community of SQL Professionals.
>> >>
>> >>
>> >> "Pasquale" wrote:
>> >>
>> >> > I need to create a report with some parameters for filtering data.
>> >> > This report must be called by URL link on an Html page.
>> >> > This link must contains the values of these parameters; I don' want
>> >> > specify the values when I see the report by clicking on View report
>> >> > button.
>> >> > Is it possible? How?
>> >> > What is the format of link for passing parameters to filter data?
>> >> >
>> >> > Many thanks
>>|||My issue has two aspects:
1. passing a parameter via URL to call my report filtering data by the
parameter;
2. hide or protect parameter inside report manager to avoid any user's
changes.
The first step is solved. The report is called correctly and I see the
correct value
of parameter (the same written in the URL). I have written correctly the
name of parameter.
Now, when I set user request for the parameter, inside report manager, to
false
in order to hide the parameter, this message error occurs:
"sReadOnlyReportParameter" and I cannot the value of parameter by the value
in the URL.
This strange behaviour represents a limit of RS!
Moreover, I have specified a default value of parameter with a particular
value.
Now, is it really possible to solve completely this issue?
Do I have a particular SP (SP1, SP2, ...)?
Many thanks
"Bruce L-C [MVP]" wrote:
> Two different things. First is getting the parameters to work. Then making
> them hidden. Do you have them working properly so you know your URL is
> correct. Be sure that your parameter is with the correct case since RS is
> case sensitive with parameters. Once you know your URL is correct because
> your report works properly then you can deal with hidding the parameters.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:E50B32E5-DCC3-448C-A679-75233BBA3F8D@.microsoft.com...
> >I have executed several tries modifying the parameter settings.
> > I have followed your suggests, but the solution isn't complete:
> > or I see the parameter or I cannot modify the parameter
> > that I pass via URL (an error occurs!!!)!
> >
> > Many thanks
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Read the rest of Wayne's post. He is telling you how to hide a parameter
> >> so
> >> the user doesn't see it.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> >> news:471AB25B-E6A6-4E1A-9756-CA42FB10DB66@.microsoft.com...
> >> >I tried passing parameters in URL address successfully,
> >> > but I see some parameters that the user hasn't change!
> >> > Moreover, if I change the parameter property "User request"
> >> > by setting to false value, the call of report dumps!
> >> >
> >> > The issue is partially solved! I need to pass a parameter by Url
> >> > and these parameters cannot change by a user.
> >> >
> >> > Can I solve this problem URGENTLY?
> >> >
> >> > Many thanks
> >> >
> >> >
> >> > "Wayne Snyder" wrote:
> >> >
> >> >> 1. Try leaving the parameter Prompt blank... This should prevent the
> >> >> parameter from displaying, (but you must provide a default value...)
> >> >>
> >> >> 2. Search for URL Access in Books on line and you will get an entire
> >> >> list
> >> >> of all of the things you can do via URL in reporting services.
> >> >>
> >> >> Hope this helps..
> >> >> --
> >> >> Wayne Snyder MCDBA, SQL Server MVP
> >> >> Mariner, Charlotte, NC
> >> >>
> >> >> I support the Professional Association for SQL Server ( PASS) and
> >> >> it''s
> >> >> community of SQL Professionals.
> >> >>
> >> >>
> >> >> "Pasquale" wrote:
> >> >>
> >> >> > I need to create a report with some parameters for filtering data.
> >> >> > This report must be called by URL link on an Html page.
> >> >> > This link must contains the values of these parameters; I don' want
> >> >> > specify the values when I see the report by clicking on View report
> >> >> > button.
> >> >> > Is it possible? How?
> >> >> > What is the format of link for passing parameters to filter data?
> >> >> >
> >> >> > Many thanks
> >>
> >>
> >>
>
>|||I have controlled all settings of the report; then I try to set to blank
the user request string inside report manager (maintaning a default
value for the parameter): so, I can modify the parameter by passing it
via URL and simultaneously hide it in order to avoid any user's changes.
Finally, the issue is solved!!!
Many thanks
"Bruce L-C [MVP]" wrote:
> Two different things. First is getting the parameters to work. Then making
> them hidden. Do you have them working properly so you know your URL is
> correct. Be sure that your parameter is with the correct case since RS is
> case sensitive with parameters. Once you know your URL is correct because
> your report works properly then you can deal with hidding the parameters.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:E50B32E5-DCC3-448C-A679-75233BBA3F8D@.microsoft.com...
> >I have executed several tries modifying the parameter settings.
> > I have followed your suggests, but the solution isn't complete:
> > or I see the parameter or I cannot modify the parameter
> > that I pass via URL (an error occurs!!!)!
> >
> > Many thanks
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Read the rest of Wayne's post. He is telling you how to hide a parameter
> >> so
> >> the user doesn't see it.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> >> news:471AB25B-E6A6-4E1A-9756-CA42FB10DB66@.microsoft.com...
> >> >I tried passing parameters in URL address successfully,
> >> > but I see some parameters that the user hasn't change!
> >> > Moreover, if I change the parameter property "User request"
> >> > by setting to false value, the call of report dumps!
> >> >
> >> > The issue is partially solved! I need to pass a parameter by Url
> >> > and these parameters cannot change by a user.
> >> >
> >> > Can I solve this problem URGENTLY?
> >> >
> >> > Many thanks
> >> >
> >> >
> >> > "Wayne Snyder" wrote:
> >> >
> >> >> 1. Try leaving the parameter Prompt blank... This should prevent the
> >> >> parameter from displaying, (but you must provide a default value...)
> >> >>
> >> >> 2. Search for URL Access in Books on line and you will get an entire
> >> >> list
> >> >> of all of the things you can do via URL in reporting services.
> >> >>
> >> >> Hope this helps..
> >> >> --
> >> >> Wayne Snyder MCDBA, SQL Server MVP
> >> >> Mariner, Charlotte, NC
> >> >>
> >> >> I support the Professional Association for SQL Server ( PASS) and
> >> >> it''s
> >> >> community of SQL Professionals.
> >> >>
> >> >>
> >> >> "Pasquale" wrote:
> >> >>
> >> >> > I need to create a report with some parameters for filtering data.
> >> >> > This report must be called by URL link on an Html page.
> >> >> > This link must contains the values of these parameters; I don' want
> >> >> > specify the values when I see the report by clicking on View report
> >> >> > button.
> >> >> > Is it possible? How?
> >> >> > What is the format of link for passing parameters to filter data?
> >> >> >
> >> >> > Many thanks
> >>
> >>
> >>
>
>|||Making parameters hidden is much more straight forward in RS 2005. I don't
hide parameters so I have not had that issue.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:8DE20C29-CBB1-4020-93BD-6D8C71361AD2@.microsoft.com...
>I have controlled all settings of the report; then I try to set to blank
> the user request string inside report manager (maintaning a default
> value for the parameter): so, I can modify the parameter by passing it
> via URL and simultaneously hide it in order to avoid any user's changes.
> Finally, the issue is solved!!!
> Many thanks
>
> "Bruce L-C [MVP]" wrote:
>> Two different things. First is getting the parameters to work. Then
>> making
>> them hidden. Do you have them working properly so you know your URL is
>> correct. Be sure that your parameter is with the correct case since RS is
>> case sensitive with parameters. Once you know your URL is correct because
>> your report works properly then you can deal with hidding the parameters.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
>> news:E50B32E5-DCC3-448C-A679-75233BBA3F8D@.microsoft.com...
>> >I have executed several tries modifying the parameter settings.
>> > I have followed your suggests, but the solution isn't complete:
>> > or I see the parameter or I cannot modify the parameter
>> > that I pass via URL (an error occurs!!!)!
>> >
>> > Many thanks
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Read the rest of Wayne's post. He is telling you how to hide a
>> >> parameter
>> >> so
>> >> the user doesn't see it.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
>> >> news:471AB25B-E6A6-4E1A-9756-CA42FB10DB66@.microsoft.com...
>> >> >I tried passing parameters in URL address successfully,
>> >> > but I see some parameters that the user hasn't change!
>> >> > Moreover, if I change the parameter property "User request"
>> >> > by setting to false value, the call of report dumps!
>> >> >
>> >> > The issue is partially solved! I need to pass a parameter by Url
>> >> > and these parameters cannot change by a user.
>> >> >
>> >> > Can I solve this problem URGENTLY?
>> >> >
>> >> > Many thanks
>> >> >
>> >> >
>> >> > "Wayne Snyder" wrote:
>> >> >
>> >> >> 1. Try leaving the parameter Prompt blank... This should prevent
>> >> >> the
>> >> >> parameter from displaying, (but you must provide a default
>> >> >> value...)
>> >> >>
>> >> >> 2. Search for URL Access in Books on line and you will get an
>> >> >> entire
>> >> >> list
>> >> >> of all of the things you can do via URL in reporting services.
>> >> >>
>> >> >> Hope this helps..
>> >> >> --
>> >> >> Wayne Snyder MCDBA, SQL Server MVP
>> >> >> Mariner, Charlotte, NC
>> >> >>
>> >> >> I support the Professional Association for SQL Server ( PASS) and
>> >> >> it''s
>> >> >> community of SQL Professionals.
>> >> >>
>> >> >>
>> >> >> "Pasquale" wrote:
>> >> >>
>> >> >> > I need to create a report with some parameters for filtering
>> >> >> > data.
>> >> >> > This report must be called by URL link on an Html page.
>> >> >> > This link must contains the values of these parameters; I don'
>> >> >> > want
>> >> >> > specify the values when I see the report by clicking on View
>> >> >> > report
>> >> >> > button.
>> >> >> > Is it possible? How?
>> >> >> > What is the format of link for passing parameters to filter data?
>> >> >> >
>> >> >> > Many thanks
>> >>
>> >>
>> >>
>>sql
Link Tables
I would like to link between the two. I have used the link
table wizard to link a table from a secondary database
with Microsoft Access and was wondering if there is a way
to do this in SQL Server 2KThank you so very much!!!|||Try a View
CREATE VIEW DatabasenameN.Owner.VW_test
AS
SELECT a.V1, a.V2, b.V3 ......
FROM Databasename1.Owner.Table1 a
JOIN Databasename2.Owner.Table2 b on a.Vx = b.Vy
WHERE ......
Hope this Helps
Friday, March 23, 2012
Lines in text column run together
I'm using SQL RS 2000. My report has a text column that contains line
breaks. When printing this column in on a report, all of the lines run
together.
I've tried using a grid and list view and neither work.
Any ideas? Is there a function I should be using?
Thanks.
- JeffAre you using vbcrlf for the line breaks? I use that and it has always
worked for me.
"Jeff" wrote:
> Hi,
> I'm using SQL RS 2000. My report has a text column that contains line
> breaks. When printing this column in on a report, all of the lines run
> together.
> I've tried using a grid and list view and neither work.
> Any ideas? Is there a function I should be using?
> Thanks.
> - Jeff|||What do I do with the vrcrlf? The source application SQL RS is reading from
is a Great Plains text column. So I don't have control over how the data
enters the field. I just want to report it out.
- J
"SFrench" wrote:
> Are you using vbcrlf for the line breaks? I use that and it has always
> worked for me.
> "Jeff" wrote:
> > Hi,
> >
> > I'm using SQL RS 2000. My report has a text column that contains line
> > breaks. When printing this column in on a report, all of the lines run
> > together.
> >
> > I've tried using a grid and list view and neither work.
> >
> > Any ideas? Is there a function I should be using?
> >
> > Thanks.
> >
> > - Jeffsql
Monday, March 19, 2012
Line feed problem in HTML
I use the equivalent of the old vbCrLf i.e. carriage return followed by a line feed, and this works fine in the HTML.
Try using Chr(13) & Chr(10) or the .NET property Environment.NewLine.
For formatting in SQL I use CHAR(13) + CHAR(10)
|||I'm sorry but I didn't get it. I have 3 rows long field in report(Fields!Address.value) and that value contains those carriage returns. So should I edit the expression of the field to find where the carriage returns are and replace them somehow?|||try Replace(Fields!Address.Value, chr(10), Environment.NewLine)Line Break formatting
I have a report with a narrow column. The column contains a comma delimited number list.
If the length of the string exceeds the width of the column then the line breaks. No problem with this, except that there are breaks between the numbers.
Example:
123,124,125,126
can be formatted as
123,12
4, 125,1
26
I'd like to force a break at a position within the string if its on the comma. Any thoughts on doing this in the Expressions window?
TIA
anyone please?|||you'll need to have space after the commas.|||By assuming that all your number list of three digits than we can adjust the column width such that it fixes the numbers. if numbers are not fixed length digits than i wont think we can do .
|||The numbers can be any length (1 to n digits). They are also not always guaranteed to be numeric; they can be alphanumeric as well (but still sequential).|||Use vbcrlf. I'm putting a line break in my address with the below code. I tried \r\n, <br>, all kinds of stuff. vbcrlf is what I needed.
=Fields!SHIPTO.Value & vbcrlf & Fields!SHP_TO_CTY.Value & ", " & Fields!SHP_TO_ST.Value & " " & Fields!SHP_TO_ZIP.Value
|||vbcrlf will work but seeing as we're in the .NET world now I would recommend using Environment.NewLine
Line Break formatting
I have a report with a narrow column. The column contains a comma delimited number list.
If the length of the string exceeds the width of the column then the line breaks. No problem with this, except that there are breaks between the numbers.
Example:
123,124,125,126
can be formatted as
123,12
4, 125,1
26
I'd like to force a break at a position within the string if its on the comma. Any thoughts on doing this in the Expressions window?
TIA
anyone please?|||you'll need to have space after the commas.|||By assuming that all your number list of three digits than we can adjust the column width such that it fixes the numbers. if numbers are not fixed length digits than i wont think we can do .
|||The numbers can be any length (1 to n digits). They are also not always guaranteed to be numeric; they can be alphanumeric as well (but still sequential).|||Use vbcrlf. I'm putting a line break in my address with the below code. I tried \r\n, <br>, all kinds of stuff. vbcrlf is what I needed.
=Fields!SHIPTO.Value & vbcrlf & Fields!SHP_TO_CTY.Value & ", " & Fields!SHP_TO_ST.Value & " " & Fields!SHP_TO_ZIP.Value
|||vbcrlf will work but seeing as we're in the .NET world now I would recommend using Environment.NewLine
Line Break down
It can contain more of less information.
What I need is that it can be broke down in order in which they came.
1st Detail line: 21
2nd Detail line: 36.02
3rd Detail line: 11141.75
4th Detail line: 1
How can I achive this?You are going to use the left(), Mid(), and right() functions.
You will have 4 formulas.
This will work for the number you show.
1. Left({@.frmPrevMonth} ,2) // gets 21
2. Mid({@.frmPrevMonth} ,4,5) // gets 36.02
3. Mid({@.frmPrevMonth} 10,8) // gets 11141.75
4. Right({@.frmPrevMonth} ,1) // gets 1
GJ|||I forgot to put down that the numbers vary in size and it is not always 4 things I need. It can be a total of 10 lines or 1 line.|||Ok here is a formula that will get the first strings before the first comma.
I assume you want the values between the commas.
'This formula uses Basic syntax
dim StringInput as string
dim Character as string
dim NumberOfCharacters as number
'The StringInput, Character and NumberOfCharacters
'variables can be changed to your values
StringInput = {@.Number}
Character = ","
NumberOfCharacters = 0
'NumberOfCharacters specifies that the token returned
'If the token to be retrieved comes before the first
'occurrence of Character, use 0 for NumberOfCharacters.
dim Token as number
dim Increment as number
dim Output as string
dim Ender as number
Ender = NumberOfCharacters + 1
do until Token = Ender or Increment = length(StringInput)
Increment = Increment + 1
if StringInput(Increment) = Character then Token= Token + 1
if Ender - Token = 1 and StringInput(Increment) <> Character then Output = Output + StringInput(Increment)
loop
Formula = Output
If you could have up to 10 lines then you will have 10 formulas the way I show, just change the variable at NumberOfCharacters. 1st formula has a 0, 2nd would have a 1 and up to 9 for 10 lines.
Hope that makes sense, someone else might have an easier way of doing this.
GJ|||Look at the help for the Split function, and on arrays.
e.g.
stringvar array parts := split({table.field}); //or maybe numbervar, if all your parts are numbers
parts[2] //return the 2nd part|||Oops, meant to add the 2nd parameter to the split function:
split({table.field}, ',');|||I tried the split function.
Attached is what I am looking for. Thanks.|||Ok here is a formula that will get the first strings before the first comma.
I assume you want the values between the commas.
'This formula uses Basic syntax
dim StringInput as string
dim Character as string
dim NumberOfCharacters as number
'The StringInput, Character and NumberOfCharacters
'variables can be changed to your values
StringInput = {@.Number}
Character = ","
NumberOfCharacters = 0
'NumberOfCharacters specifies that the token returned
'If the token to be retrieved comes before the first
'occurrence of Character, use 0 for NumberOfCharacters.
dim Token as number
dim Increment as number
dim Output as string
dim Ender as number
Ender = NumberOfCharacters + 1
do until Token = Ender or Increment = length(StringInput)
Increment = Increment + 1
if StringInput(Increment) = Character then Token= Token + 1
if Ender - Token = 1 and StringInput(Increment) <> Character then Output = Output + StringInput(Increment)
loop
Formula = Output
If you could have up to 10 lines then you will have 10 formulas the way I show, just change the variable at NumberOfCharacters. 1st formula has a 0, 2nd would have a 1 and up to 9 for 10 lines.
Hope that makes sense, someone else might have an easier way of doing this.
GJ
ok. how can I dynamically increase the "NumberOfCharacters" after everytime a record is read and then have it display it on the detail line?|||Have not had time today to work formula. Why not use the split function like JaganEllis suggested. It's quicker and easier to understand.
GJ|||An example to produce what I think you want:
local stringvar a := "21,36.02,11141.75,1";
local stringvar array parts := split(a, ',');
local numbervar i;
local stringvar out;
for i := 1 to ubound(parts) do
(
out := out + parts[i] + chr(13) + chr(10);
);
out
And remember to check the 'Can Grow' option for the field, in the Common tab of the Format Field option.